export default function httpErrors (res) {
  let info = ''
  switch (res.status) {
    case 204:
      info = '操作成功'
      break;
    case 429:
      info = '操作太频繁了，请稍候再试！'
      break;
    case 400:
      info = '请求出错了！'
      break;
    case 403:
    case 401:
    case 402:
      info = '您没有权限进行此操作！'
      break;
    case 422:
      info = res.data.errors
      break
    default:
      info = '服务器异常'
  }
  return {
    info: info
  }
}

